//
//  WYCHeartViewController.m
//  58卡秘书
//
//  Created by 王晓民 on 2018/1/25.
//  Copyright © 2018年 中企互联. All rights reserved.
//

#import "WYCHeartViewController.h"

@interface WYCHeartViewController ()<UIWebViewDelegate>
@property (nonatomic,strong)UIWebView *policyWebView;

@end

@implementation WYCHeartViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupNav];
    [SVProgressHUD showWithStatus:@"加载中..."];
    
    _policyWebView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight)];
    
    NSString *chinese = @"随心借贷";
    
    NSString *encodeStr = [chinese stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    
    NSLog(@"wqc====%@", encodeStr);
NSString * str = [NSString stringWithFormat:@"http://creditcard.ecitic.com/h5/youhui/170110_2/index.html?sid=SJNPTAK3&qd=FZX&rk=FZX&hd=NO%@",encodeStr];
    
    NSLog(@"wqc=======%@",str);
    
    NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:str]];
    [SVProgressHUD dismiss];
    
    [self.view addSubview: _policyWebView];
    
    [_policyWebView loadRequest:request];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
//Nav字体颜色+ 背景
- (void)setupNav {
    self.navigationItem.title = @"随心借贷";
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
    [self.navigationController.navigationBar setBarTintColor:wycMain];
}

@end
